<%@ page import="java.util.*" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<script src="js/glDatePicker.min.js"></script>
<link rel="stylesheet" href="css/components/calendar/calendar.css" />
<link rel="stylesheet" href="css/components/calendar/defaultCalendar.css" />

<%
Locale locale = new Locale((String)session.getAttribute("LanguageCode"), (String)session.getAttribute("LanguageSubcode"));
ResourceBundle resource = ResourceBundle.getBundle("resource", locale);
%>
<script>
	$(function() {
		$( "#datepicker" ).glDatePicker({
			showAlways: true,
			position: "inherit",
			monthNames: ["<% out.print(resource.getString("Month.Full.January")); %>",
						 "<% out.print(resource.getString("Month.Full.February")); %>",
						 "<% out.print(resource.getString("Month.Full.March")); %>",
						 "<% out.print(resource.getString("Month.Full.April")); %>",
						 "<% out.print(resource.getString("Month.Full.May")); %>",
						 "<% out.print(resource.getString("Month.Full.June")); %>",
						 "<% out.print(resource.getString("Month.Full.July")); %>",
						 "<% out.print(resource.getString("Month.Full.August")); %>",
						 "<% out.print(resource.getString("Month.Full.September")); %>",
						 "<% out.print(resource.getString("Month.Full.October")); %>",
						 "<% out.print(resource.getString("Month.Full.November")); %>",
						 "<% out.print(resource.getString("Month.Full.December")); %>"],
			onClick: function(target, newDate) {
				selectedDate = newDate;
				cerltimespan(savedSpan);
			}
        });
    }); 
</script>

<div class="calendarTable rounded-corners" style="margin-bottom:5px;">
	<div class="calendarTitle"><% out.print(resource.getString("Calendar.SelectDate")); %></div>
	<div class="calendarArea"><input type="hidden" id="datepicker" class="gldp _gldp"></div>
	<div class="calendarSelectToday" ><span onClick="selectedDate = getDate(); $(this).datepicker('setDate', selectedDate);  cerltimespan(savedSpan);"><% out.print(resource.getString("Calendar.SelectToday")); %></span></div>
    </div>
